


	class CompressLoadInfo {
		private _progFunc:Function;
		private _callBackFunc:Function;
		private _resCount:number = 0;
		private _resMax:number = 0;
		public curLoadInfo:LoadInfo;
		public thisObject:any;
		public constructor() {

		}
		public setResCount(cur, max): void {
			let s = this;
			s._resCount = cur;
			s._resMax = max;
		}
		public set callBackFunc(val: Function) {
			let s = this;
			s._callBackFunc = val;
		}
		/**加载完成回调函数*/
		public get callBackFunc(): Function {
			let s = this;
			return s._callBackFunc;
		}
		public set progFunc(val: Function) {
			let s = this;
			s._progFunc = val;
		}
		/**加载进度回调函数*/
		public get progFunc(): Function {
			let s = this;
			return s._progFunc;
		}
		public callBack(l: LoadInfo = null) {
			let s = this;
			--s._resCount;
			s.curLoadInfo = l;
			if (s._progFunc != null)
				s._progFunc.call(s.thisObject, s);
			if (s._resCount == 0) {				
				if (s._callBackFunc != null)
					s._callBackFunc.call(s.thisObject, s);
			}
		}

		/**资源总数*/
		public get resMax(): number {
			let s = this;
			return s._resMax;
		}

		/**未解压的资源数*/
		public get resCount(): number {
			let s = this;
			return s._resCount;
		}
	}
